%%
%% This is file `rotating.sty' generated
%% on <1992/5/10> with the docstrip utility (v1.1k).
%%
%% The original source file was `rotating.doc'.
%%
%%
%%
%% IMPORTANT NOTICE:
%%
%% You are not allowed to change this file. You may however copy this file
%% to a file with a different name and then change the copy.
%%
%% You are NOT ALLOWED to distribute this file alone. You are NOT ALLOWED
%% to take money for the distribution or use of this file (or a changed
%% version) except for a nominal charge for copying etc.
%%
%% You are allowed to distribute this file under the condition that it is
%% distributed together the documentation file.
%%
\def\styleoption{rotating.sty}
\def\fileversion{v1.6}
\def\filedate{92/5/10}
\immediate\write\sixt@@n{Style option: \styleoption,
\fileversion\space <\filedate> (SPQR / LMB)}
\def\degrees{$^{\mbox{\rm\small o}}$}

\def\rot@start{}
\def\rot@end{}
\def\rotdriver#1{%
  \bgroup\edef\next{\def\noexpand\tempa{#1}}%
    \uppercase\expandafter{\next}%
    \def\LN{DVITOLN03}%
    \def\DVItoPS{DVITOPS}%
    \def\DVIPS{DVIPS}%
    \def\emTeX{EMTEX}%
    \def\Textures{TEXTURES}%
    \global\chardef\rot@driversetup=0
    \ifx\tempa\LN
        \global\chardef\rot@driversetup=0\fi
    \ifx\tempa\DVItoPS
        \global\chardef\rot@driversetup=1\fi
    \ifx\tempa\DVIPS
        \global\chardef\rot@driversetup=2\fi
    \ifx\tempa\emTeX
        \global\chardef\rot@driversetup=3\fi
    \ifx\tempa\Textures
        \global\chardef\rot@driversetup=4\fi
  \egroup
\ifcase\rot@driversetup \typeout{WARNING! ****
 no specials for LN03  rotation}
\or \rot@count=1
\def\rot@start{\special{dvitops: origin
    rot\the\rot@count}%
\special{dvitops: begin rot\the\rot@count}}%
\def\rot@end{\special{dvitops: end}%
\special{dvitops: rotate rot\the\rot@count \space
    \the\rot@angle}%
\global\advance\rot@count by1}%
\or
\def\rot@start{\special{ps:gsave currentpoint
currentpoint translate \the\rot@angle\space
rotate  neg exch neg exch translate}}%
\def\rot@end{\special{ps:currentpoint
grestore moveto}}%
\or % case 3, emTeX
\typeout{WARNING! ***
 emTeX does no rotation at this time}
\or \typeout{Textures rotation}
\def\rot@start{\special{postscript
  0 0 transform                 % Get current location in device
                                % coordinates.
  grestore                      % Undoes TeXtures gsave.
  matrix currentmatrix          % Save current transform on stack for use
                                % by \@unrotate.
  3 1 roll                      % Put transform at back of current location.
  itransform                    % Current location in TeXtures coords
  dup 3 -1 roll                 % Duplicate the location; x y ==> x y x y
  dup 4 1 roll exch
  translate                     % Translate origin to current location
 % 1 -1 scale                    % Flip y coordinate
  \the\rot@angle\space rotate   % Rotate by \@rotation
 % 1 -1 scale                    % Unflip y coordinate
  neg exch neg exch translate   % Translate origin back
  gsave}}                       % To match grestore
\def\rot@end{\special{postscript
  grestore                      % Undoes TeXtures gsave
  setmatrix                     % Set current transform to value saved on
                                % stack.  (Hopefully, it's still there.)
  gsave}}                       % To match grestore
\else \typeout{WARNING! ***
 unknown  driver - no rotation}
\fi }
\newsavebox{\rot@box}%
\newsavebox{\rot@tempbox}%
\newdimen\rot@temp
\newdimen\rot@width
\newdimen\rot@height
\newdimen\rot@depth
\newdimen\rot@right
\newdimen\rot@left
\newcount\rot@angle
\newcount\rot@count
\newcount\rot@circle
\def\sideways{\savebox{\rot@box}\bgroup}
\def\endsideways{\egroup%
\rot@angle-90 \rot@width\ht\rot@box \advance\rot@width by\dp\rot@box
\rot@height\wd\rot@box
\wd\rot@box0pt%
\dp\rot@box0pt%
\ht\rot@box0pt%
\rule{\rot@width}{0pt}%
\rlap{\rule{0pt}{\rot@height}}%
\rot@start\usebox{\rot@box}\rot@end%
}
\def\rotate#1{%
\global\rot@angle=#1 \savebox{\rot@box}\bgroup}
\def\endrotate{\egroup%
\rot@start%
\dp\rot@box=0pt\wd\rot@box=0pt\ht\rot@box=0pt%
\usebox{\rot@box}%
\rot@end%
}%
\def\turn#1{%
\global\rot@angle=#1
\savebox{\rot@box}\bgroup}%
\def\endturn{%
\egroup%
\multiply\rot@angle by-1
\Sine{\rot@angle}%
\let\sineA\sine
\advance\rot@angle by90%
\Sine{\rot@angle}%
\let\sineB\sine
\def\sineC{-\sine}%
\def\cosineA{-\sineC}%
\def\cosineB{-\sineA}%
\let\cosineC\sineA
\advance\rot@angle by-90%
\def\rot@Bx{\rot@temp\cosineA\wd\rot@box
   \advance\rot@temp by -\sineA\ht\rot@box}%
\def\rot@By{\rot@temp\sineA\wd\rot@box
  \advance\rot@temp by \cosineA\ht\rot@box}%
\def\rot@Cx{\rot@temp\cosineB\ht\rot@box}%
\def\rot@Cy{\rot@temp\sineB\ht\rot@box}%
\def\rot@Dx{\rot@temp\cosineC\dp\rot@box}%
\def\rot@Dy{\rot@temp\sineC\dp\rot@box}%
\def\rot@Ex{\rot@temp\cosineC\dp\rot@box
   \advance\rot@temp by -\sineC\wd\rot@box}%
\def\rot@Ey{\rot@temp\sineC\dp\rot@box
   \advance\rot@temp by \cosineC\wd\rot@box}%
\rot@circle\rot@angle \ifnum\rot@circle<0
     \advance\rot@circle by 360
\fi \ifnum\rot@circle<90 \rot@By\rot@height\rot@temp
\rot@Ex\rot@right\rot@temp \rot@Cx\rot@left\rot@temp
\rot@Dy\rot@depth\rot@temp \else
     \ifnum\rot@circle<180
       \rot@Ey\rot@height\rot@temp
       \rot@Dx\rot@right\rot@temp
       \rot@Bx\rot@left\rot@temp
       \rot@Cy\rot@depth\rot@temp
     \else
            \ifnum\rot@circle<270
           \rot@Dy\rot@height\rot@temp
           \rot@Cx\rot@right\rot@temp
           \rot@Ex\rot@left\rot@temp
           \rot@By\rot@depth\rot@temp
            \else
           \rot@Cy\rot@height\rot@temp
           \rot@Bx\rot@right\rot@temp
           \rot@Dx\rot@left\rot@temp
           \rot@Ey\rot@depth\rot@temp
          \fi
     \fi
\fi \multiply\rot@angle by-1
\wd\rot@box=0pt\ht\rot@box=0pt%
\ifdim\rot@left<0pt
     \rule{-\rot@left}{0pt}%
\fi \ifdim\rot@height>0pt
     \rlap{\rule{0pt}{\rot@height}}%
\fi \ifdim\rot@depth<0pt
     \rlap{\rule[\rot@depth]{0pt}{-\rot@depth}}%
\fi
\rot@start\usebox{\rot@box}\rot@end%
\ifdim\rot@right>0pt
      \rule{\rot@right}{0pt}%
\fi
}%
\def\@rotfloat#1{\@ifnextchar[{\@xrotfloat{#1}}{%
\edef\@tempa{\noexpand\@xrotfloat{#1}[\csname
fps@#1\endcsname]}\@tempa}}
\def\@xrotfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
   \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
      \@parmoderr\@floatpenalty\z@
    \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
       \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
       \@tfor \@tempa :=#2\do
                        {\if\@tempa h\advance\@tempcnta \@ne\fi
                         \if\@tempa t\advance\@tempcnta \tw@\fi
                         \if\@tempa b\advance\@tempcnta 4\relax\fi
                         \if\@tempa p\advance\@tempcnta 8\relax\fi
         }\global\count\@currbox\@tempcnta}\@fltovf\fi
    \global\setbox\@currbox\vbox\bgroup
  \hsize\textheight \@parboxrestore
}
\def\end@rotfloat{\par\vskip\z@\egroup%
   \ifnum\@floatpenalty <\z@
    \global\setbox\rot@tempbox\box\@currbox
   \global\setbox\@currbox\vbox{\centerline{\begin{turn}{-90}%
    \box\rot@tempbox\end{turn}}}%
     \@cons\@currlist\@currbox
     \typeout{Adding sideways figure to list,
  \the\ht\@currbox\space by \the\wd\@currbox}%
     \ifdim \ht\@currbox >\textheight
        \@warning{Float larger than \string\textheight}%
        \ht\@currbox\textheight \fi
     \ifnum\@floatpenalty <-\@Mii
        \penalty -\@Miv
        \@tempdima\prevdepth
        \vbox{}%
        \prevdepth \@tempdima
        \penalty\@floatpenalty
      \else \vadjust{\penalty -\@Miv
      \vbox{}\penalty\@floatpenalty}\@esphack
     \fi\fi}
\let\l@sidewaysfigure\l@figure
\let\c@sidewaysfigure\c@figure
\let\p@sidewaysfigure\p@figure
\let\thesidewaysfigure\thefigure
\def\fps@sidewaysfigure{tbp}
\def\ftype@sidewaysfigure{1}
\def\ext@sidewaysfigure{lof}
\def\fnum@sidewaysfigure{Figure \thefigure}
\def\sidewaysfigure{\let\make@caption\make@rcaption
\@rotfloat{sidewaysfigure}}
\let\endsidewaysfigure\end@rotfloat
\let\l@sidewaystable\l@table
\let\c@sidewaystable\c@table
\let\p@sidewaystable\p@table
\let\thesidewaystable\thetable
\def\fps@sidewaystable{tbp}
\def\ftype@sidewaystable{2}
\def\ext@sidewaystable{lot}
\def\fnum@sidewaystable{Table \thetable}
\def\sidewaystable{\let\make@caption\make@rcaption
\@rotfloat{sidewaystable}}
\let\endsidewaystable\end@rotfloat
\long\def\@makercaption#1#2{%
   \vskip 10\p@
   \setbox\@tempboxa\hbox{#1: #2}%
   \ifdim \wd\@tempboxa >\vsize
       #1: #2\par
     \else
       \hbox to\vsize{\hfil\box\@tempboxa\hfil}%
   \fi}%
\def\rotcaption{\refstepcounter\@captype\@dblarg{\@rotcaption\@captype}}
\long\def\@rotcaption#1[#2]#3{%
\addcontentsline{\csname ext@#1\endcsname}{#1}{%
 \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
  \par
  \begingroup
    \@parboxrestore
    \normalsize
    \@makerotcaption{\csname fnum@#1\endcsname}{#3}%
  \endgroup}
\long\def\@makerotcaption#1#2{%
 \setbox\@tempboxa\hbox{#1: #2}%
 \ifdim \wd\@tempboxa > .8\vsize
    \begin{rotate}{-90}%
    \begin{minipage}[b]{.8\textheight}#1 #2\end{minipage}%
    \end{rotate}\par
 \else%
    \mbox{\begin{rotate}{-90}\box\@tempboxa\end{rotate}}%
 \fi
 \hspace{12pt}%
}

\chardef\letter = 11 \chardef\other = 12
\newif\ifdebug%
\newif\ifc@mpute%
\c@mputetrue%
\let\then =\relax
\def\r@dian{pt }%
\let\r@dians =\r@dian
\let\dimensionless@nit =\r@dian
\let\dimensionless@nits =\dimensionless@nit
\def\internal@nit{sp }%
\let\internal@nits =\internal@nit
\newif\ifstillc@nverging
\def\Mess@ge #1{\ifdebug\then\message {#1}\fi}%
{%
\catcode `\@ =\letter
\gdef\nodimen {\expandafter\n@dimen\the\dimen}%
\gdef\term #1 #2 #3%
{\edef\t@ {\the #1}%
\edef\t@@ {\expandafter\n@dimen\the #2\r@dian}%
\t@rm {\t@} {\t@@} {#3}%
}%
\gdef\t@rm #1 #2 #3%
{{%
\count 0 = 0 \dimen 0 = 1\dimensionless@nit \dimen 2 = #2\relax
\Mess@ge {Calculating term #1 of\nodimen 2}%
\loop \ifnum\count 0 < #1 \then\advance\count 0 by 1
\Mess@ge {Iteration\the\count 0\space}%
\Multiply\dimen 0 by {\dimen 2}%
\Mess@ge {After multiplication, term =\nodimen 0}%
\Divide\dimen 0 by {\count 0}%
\Mess@ge {After division, term =\nodimen 0}%
\repeat \Mess@ge {Final value for term #1 of
\nodimen 2\space is\nodimen 0}%
\xdef\Term {#3 =\nodimen 0\r@dians}%
\aftergroup\Term
}}%
\catcode `\p =\other \catcode `\t =\other
\gdef\n@dimen #1pt{#1}%
}%
\def\Divide #1by #2{\divide #1 by #2}%
\def\Multiply #1by #2%
{{%
\count 0 = #1\relax \count 2 = #2\relax \count 4 = 65536 \Mess@ge
{Before scaling, count 0 =\the\count 0\space and
count 2 =\the\count 2}%
\ifnum\count 0 > 32767%
\then\divide\count 0 by 4 \divide\count 4 by 4 \else\ifnum\count 0 <
-32767 \then\divide\count 0 by 4 \divide\count 4 by 4 \else \fi \fi
\ifnum\count 2 > 32767%
\then\divide\count 2 by 4 \divide\count 4 by 4 \else\ifnum\count 2 <
-32767 \then\divide\count 2 by 4 \divide\count 4 by 4 \else \fi \fi
\multiply\count 0 by\count 2 \divide\count 0 by\count 4
\xdef\product {#1 =\the\count 0\internal@nits}%
\aftergroup\product
}}%
\def\r@duce{\ifdim\dimen0 > 90\r@dian\then%
\multiply\dimen0 by -1 \advance\dimen0 by 180\r@dian \r@duce
\else\ifdim\dimen0 < -90\r@dian\then%
\advance\dimen0 by 360\r@dian \r@duce \fi
\fi}%
\def\Sine#1%
{{%
       \dimen 0 = #1\r@dian
       \r@duce
       \ifdim\dimen0 = -90\r@dian\then
              \dimen4 = -1\r@dian
              \c@mputefalse
       \fi
       \ifdim\dimen0 = 90\r@dian\then
              \dimen4 = 1\r@dian
              \c@mputefalse
       \fi
       \ifdim\dimen0 = 0\r@dian\then
       \dimen4 = 0\r@dian
       \c@mputefalse
\fi \ifc@mpute\then \divide\dimen0 by 180 \dimen0=3.141592654\dimen0
\dimen 2 = 3.1415926535897963\r@dian%
\divide\dimen 2 by 2%
\Mess@ge {Sin: calculating Sin of\nodimen 0}%
\count 0 = 1%
\dimen 2 = 1\r@dian%
\dimen 4 = 0\r@dian%
\loop
\ifnum\dimen 2 = 0%
\then\stillc@nvergingfalse \else\stillc@nvergingtrue \fi
\ifstillc@nverging%
\then\term {\count 0} {\dimen 0} {\dimen 2}%
\advance\count 0 by 2 \count 2 =\count 0 \divide\count 2 by 2
\ifodd\count 2%
\then\advance\dimen 4 by\dimen 2 \else\advance\dimen 4 by -\dimen 2
\fi \repeat \fi
\xdef\sine {\nodimen 4}%
}}%
\def\Cosine#1{\ifx\sine\UnDefined\edef\Savesine{\relax}\else
\edef\Savesine{\sine}\fi {\dimen0=#1\r@dian\advance\dimen0 by
90\r@dian
\Sine{\nodimen 0}%
\xdef\cosine{\sine}%
\xdef\sine{\Savesine}}} \rotdriver{dvips}
\endinput
%%
%% End of file `rotating.sty'.
